<?php
namespace SimplePHp\Rendering;

/**
 * 普通返回html页面的ViewUnit
 */
class ViewUnit implements IViewUnit {
	private $tpl;
	/**
	 * @Override
	 * @return [type] [html页面]
	 */
	public function request() {
		$element = new SimplePHp\Rendering\ElementResovle($this->tpl);
		// var_dump($element->getHtml());
		file_put_contents('ElementPhpTest.php', $element->getHtml());
	}

	/**
	 * @Override
	 * @param [type] $tpl [description]
	 */
	public function setTemplete($tpl) {
		$this->tpl = $tpl;
	}

}